
<!doctype html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><title>Python: module ConnectionZServStatsMixin</title>
</head><body bgcolor="#f0f0f8">

<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
<tr bgcolor="#7799ee">
<td valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial">&nbsp;<br><big><big><strong>ConnectionZServStatsMixin</strong></big></big></font></td
><td align=right valign=bottom
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/media/disk-1/data/zdstack/trunk/ZDStack/ConnectionZServStatsMixin.py">/media/disk-1/data/zdstack/trunk/ZDStack/ConnectionZServStatsMixin.py</a></font></td></tr></table>
    <p></p>
<p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#aa55cc">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#fffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr>
    
<tr><td bgcolor="#aa55cc"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="logging.html">logging</a><br>
</td><td width="25%" valign=top><a href="os.html">os</a><br>
</td><td width="25%" valign=top></td><td width="25%" valign=top></td></tr></table></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ee77aa">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr>
    
<tr><td bgcolor="#ee77aa"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><dl>
<dt><font face="helvetica, arial"><a href="ConnectionZServStatsMixin.html#ConnectionZServStatsMixin">ConnectionZServStatsMixin</a>
</font></dt></dl>
 <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="ConnectionZServStatsMixin">class <strong>ConnectionZServStatsMixin</strong></a></font></td></tr>
    
<tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
<td colspan=2><tt><a href="#ConnectionZServStatsMixin">ConnectionZServStatsMixin</a>&nbsp;adds&nbsp;Connection&nbsp;stats&nbsp;to&nbsp;a&nbsp;ZServ.<br>&nbsp;</tt></td></tr>
<tr><td>&nbsp;</td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="ConnectionZServStatsMixin-__init__"><strong>__init__</strong></a>(self)</dt><dd><tt>Initializes&nbsp;a&nbsp;<a href="#ConnectionZServStatsMixin">ConnectionZServStatsMixin</a></tt></dd></dl>

<dl><dt><a name="ConnectionZServStatsMixin-get_connection_log_filename"><strong>get_connection_log_filename</strong></a>(self, roll<font color="#909090">=False</font>)</dt><dd><tt>Generates&nbsp;the&nbsp;connection&nbsp;log&nbsp;filename.</tt></dd></dl>

<dl><dt><a name="ConnectionZServStatsMixin-log_ip"><strong>log_ip</strong></a>(self, player_name, player_ip)</dt><dd><tt>Logs&nbsp;an&nbsp;IP&nbsp;in&nbsp;the&nbsp;Player&nbsp;=&gt;&nbsp;IP&nbsp;database.<br>
&nbsp;<br>
player_name:&nbsp;a&nbsp;string&nbsp;representing&nbsp;the&nbsp;player's&nbsp;name.<br>
player_ip:&nbsp;&nbsp;&nbsp;a&nbsp;string&nbsp;representing&nbsp;the&nbsp;player's&nbsp;IP&nbsp;address.</tt></dd></dl>

<dl><dt><a name="ConnectionZServStatsMixin-set_connection_log_filename"><strong>set_connection_log_filename</strong></a>(self, roll<font color="#909090">=False</font>)</dt><dd><tt>Sets&nbsp;the&nbsp;connection&nbsp;log&nbsp;filename.<br>
&nbsp;<br>
roll:&nbsp;&nbsp;a&nbsp;boolean&nbsp;that,&nbsp;if&nbsp;given,&nbsp;does&nbsp;the&nbsp;following:<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-&nbsp;If&nbsp;the&nbsp;time&nbsp;is&nbsp;11pm,&nbsp;generates&nbsp;a&nbsp;logfile&nbsp;name&nbsp;for<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;the&nbsp;upcoming&nbsp;day.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-&nbsp;Does&nbsp;not&nbsp;seek&nbsp;to&nbsp;the&nbsp;end&nbsp;of&nbsp;a&nbsp;file&nbsp;before&nbsp;parsing&nbsp;it<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;for&nbsp;events&nbsp;(if&nbsp;it&nbsp;exists).<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Otherwise,&nbsp;the&nbsp;name&nbsp;generated&nbsp;is&nbsp;for&nbsp;the&nbsp;current&nbsp;day,<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;and&nbsp;the&nbsp;ZServ's&nbsp;LogFile&nbsp;will&nbsp;seek&nbsp;to&nbsp;the&nbsp;end&nbsp;of&nbsp;its<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;file&nbsp;(if&nbsp;it&nbsp;exists).</tt></dd></dl>

<dl><dt><a name="ConnectionZServStatsMixin-start_collecting_connection_stats"><strong>start_collecting_connection_stats</strong></a>(self)</dt><dd><tt>Starts&nbsp;collecting&nbsp;connection&nbsp;stats.</tt></dd></dl>

<dl><dt><a name="ConnectionZServStatsMixin-stop_collecting_connection_stats"><strong>stop_collecting_connection_stats</strong></a>(self)</dt><dd><tt>Stops&nbsp;collecting&nbsp;connection&nbsp;stats.</tt></dd></dl>

</td></tr></table></td></tr></table>
</body></html>